from script.yun_login_test import TestSum
import unittest
from tools.HTMLTestRunner import HTMLTestRunner
import datetime

#将测试用例添加到套件中
suite = unittest.TestSuite()

#添加一个类
suite.addTest(unittest.makeSuite(TestSum))

news = datetime.datetime.now().strftime("%Y%m%d%H%M%S")

# 打开文件
f = open("./report/"+news+'.html', "wb")
# 创建Runner对象
runner = HTMLTestRunner(stream=f, title="自动化测试报告",description="Chrome 浏览器")

# 执行测试条件并生成测试报告
runner.run(suite)

f.close()